// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "CharacterZD/Core/RuleAIController.h"
#include "TowerAIController.generated.h"

UCLASS()
class TF_20240717_API ATowerAIController : public ARuleAIController
{
	GENERATED_BODY()
	
	// 攻击范围内的敌人
	UPROPERTY()
	TArray<class ARuleCharacterZD*> MonsterArray;

	// 当前攻击目标
	TWeakObjectPtr<ARuleCharacterZD> Target;

	// 查询敌人间隔
	float HeartbeatDiagnosis;
	
protected:

	
	virtual void BeginPlay() override;

	void BTService_FindTarget();
	virtual void AttackTarget(ARuleCharacterZD* NewTarget) override;
	
public:
	ATowerAIController();
	virtual void Tick(float DeltaTime) override;
	virtual AActor* FindTarget() override;
};
